<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">

    <h:head>
        <title>Meg</title>
        <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
    </h:head>

    <h:body>
        <h:form>
            <rich:panel header="Zaloguj się">
                <h:panelGrid columns="2">
                    <h:outputLabel for="login" value="Login: "/>
                    <h:inputText id="login" value="#{playerInfo.login}"/>

                    <h:outputLabel for="password" value="Hasło: "/>
                    <h:inputSecret id="password" value="#{playerInfo.password}"/>
                </h:panelGrid>
                <a4j:commandButton value="Zaloguj się" action="#{playerInfo.loginAction}" render="messages" execute="@all"/>
            </rich:panel>
        </h:form>
        <h:form>
            <rich:panel header="Nie masz konta? Zarejestruj się">
                <h:panelGrid columns="2">
                    <h:outputLabel for="login2" value="Login: "/>
                    <h:inputText id="login2" value="#{playerInfo.login2}"/>

                    <h:outputLabel for="password2" value="Hasło: "/>
                    <h:inputSecret id="password2" value="#{playerInfo.password2}"/>

                    <h:outputLabel for="password3" value="Powtórz hasło: "/>
                    <h:inputSecret id="password3" value="#{playerInfo.password3}"/>

                    <h:outputLabel for="email" value="Email: "/>
                    <h:inputText id="email" value="#{playerInfo.email}"/>
                </h:panelGrid>
                <a4j:commandButton value="Zarejestruj się" action="#{playerInfo.registerAndLoginAction}" render="messages" execute="@all"/>
            </rich:panel>
        </h:form>
        <rich:messages id="messages"/>
    </h:body>
</html>